<?php
$form = $this->loginForm;
$formmsg = $form->getMessages();
if(!empty($formmsg))  {
	echo $this->helper()->makeFlashMsg(array('text'=>"Authentification échouée, veuillez bien remplir le formulaire", 'type'=>'error'));
}
$form->get('submit')->setValue('Connecter')->setAttribute('class', 'btn');
?>
<form
	action="<?php echo $this->url('user', array('action'=>'login'));?>"
	method="post">
	<fieldset>
		<legend>Accès à l'espace d'administration</legend>
		<div class="row-fluid">
			<fieldset class="span6">
				<div
					class="control-group <?php if(!empty($formmsg['identity'])) echo 'error'?>">
					<?php 
					echo $this->formLabel($form->get('identity'));
					echo $this->formElement($form->get('identity'));
					?>
				</div>
				<div
					class="control-group <?php if(!empty($formmsg['identity'])) echo 'error'?>">
					<?php 
					echo $this->formLabel($form->get('credential'));
					echo $this->formElement($form->get('credential'));
					?>
				</div>
				<div>
					<?php if ($this->redirect) { ?>
					<input type="hidden" name="redirect"
						value="<?php echo $this->redirect ?>" />
					<?php } ?>
				</div>
			</fieldset>
		</div>
	</fieldset>
	<fieldset class="form-actions">
		<?php echo $this->formSubmit($form->get('submit')) ?>
		<?php if ($this->enableRegistration) { ?>
		Nouvel utilisateur ? <a href="<?php echo $this->url('zfcuser/register') . ($this->redirect ? '?redirect='.$this->redirect : '') ?>">Créer
			un compte</a>
		<?php } ?>
	</fieldset>
</form>
